#ifndef LOCATION_H_
#define LOCATION_H_

/*
    struct for representing locations in the grid.
*/
struct Location
{
    int row, col;

    Location()
    {
        row = col = 0;
    };

    Location(int r, int c)
    {
        row = r;
        col = c;
    };
    bool operator==(const Location& loc)  const{
	if ((row==loc.row) && (col==loc.col)) {
	    return true;
	}
	else {
	    return false;
	}
    }

    bool operator!=(const Location& loc) const {
	if ((row==loc.row) && (col==loc.col)) {
	    return false;
	}
	else {
	    return true;
	}
    }
    
    bool operator<(const Location& loc) const {
	if (row==loc.row && col<loc.col) {
	    return true;
	}
	else if ( row <loc.row) {
	    return true;
	}
	else {
	    return false;
	}
    }
};

#endif //LOCATION_H_
